{% extends "reg6/list.html" %}
{% load i18n admin_modify adminmedia %}
{% block content %}<div id="content-main">

{% if object_list %}
    <table border="1" class="sortable">
    <tr>
        {% for field in field_list %}
        {% ifequal field "obtained_items" %}
            <th>ordered_items</th>
        {% endifequal %}
        <th>{{ field|escape }}</th>
        {% endfor %}
    </tr>
    {% for o in object_list %}
    <tr>
        <td>{{ o.id|escape }}</td>
        <td>{{ o.badge_type|escape }}</td>
        <td>{{ o.order|escape }}</td>
        <td>{{ o.valid|escape }}</td>
        <td>{{ o.checked_in|escape }}</td>
        <td>{{ o.salutation|escape }}</td>
        <td>{{ o.first_name|escape }}</td>
        <td>{{ o.last_name|escape }}</td>
        <td>{{ o.title|escape }}</td>
        <td>{{ o.org|escape }}</td>
        <td>{{ o.email|escape }}</td>
        <td>{{ o.zip|escape }}</td>
        <td>{{ o.phone|escape }}</td>
        <td>{{ o.promo|escape }}</td>
    <td>
        {% for item in o.ordered_items.all %}
            {{ item.name|escape }}
        {% if not forloop.last %}
        ,
        {% endif %}
        {% endfor %}
    </td>
        <td>{{ o.obtained_items|escape }}</td>
        <td>{{ o.survey_answers|escape }}</td>
    </tr>
    {% endfor %}
    </table>
    <p>
    <b>Total {{ title|escape }}</b>: {{ numbers|escape }}<br />
    <b>Valid {{ title|escape }}</b>: {{ valid|escape }}<br />
    <b>Checked In {{ title|escape }}</b>: {{ checkin|escape }}<br />
    </p>
{% else %}
    <p>No attendees available.</p>
{% endif %}

</div>
{% endblock %}
